/**
	Extends Slider to allow for easily scrubbing through frames in a timeline

	@author Chandler McWilliams
	@version 2005-07-04
*/
class timber.ui.control.Scrubber extends Slider
{
	
	private var target:MovieClip;
	
// ===========================================================
// - SET THE STEPPER TARGET
// ===========================================================
	public function setTarget(clip:MovieClip) {
		if (target == clip) return;
		
		target = clip;
		
		// set min and max
		setMin(1);
		setMax(target._totalframes);
		update();
		
		// add listener
		var c = target;
		this['addListener'](
			{
				onChange: function(val) { c.gotoAndStop(val); }
			}
		);
	}

}